#!/usr/bin/python
# _*_ coding: utf8 _*_
#Created: 2010. 7. 5.

'''
사용법:    a = CPostTwitter()
           a.WriteText(u'TEXT')
           if a:
               print 'YEAH'
           else:
               print 'boo'
'''



##GLOBALS
#트위터 계정
g_stTwitterAccount = 'sidnation'
g_stTwitterPw = 'ehfrhfo'

##IMPORTS
import tweepy


class CPostTwitter():
    pass
    def __init__(self):
        pass

    def WriteText(self, a_stPostText):
        pass
        global g_stTwitterAccount, g_stTwitterPw

        try:
            auth = tweepy.BasicAuthHandler(g_stTwitterAccount, g_stTwitterPw)
            api = tweepy.API(auth)
            api.update_status(a_stPostText)
        except:
            pass
            return False
        
        return True


def main():
    pass
    
    
if __name__ == "__main__":
    main()
